package com.lcj.ssm.mapper;

import com.lcj.ssm.po.Role;
import com.lcj.ssm.po.RoleCustomer;
import com.lcj.ssm.po.RoleExample;
import com.lcj.ssm.po.RolePriv;
import com.lcj.ssm.po.RoleVO;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
    int countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
    
    List<Role> selectRoleList(RoleVO rolevo);
    
    int selectTotalCount();
    
    Role selectRoleByName(String name);
    
    List<Role> selectAll();
    
    int addRolePriv(RolePriv rp);
    
    int deleteRolePriv(RolePriv rp);
    
    List<RolePriv> selectRolePrivListByRole(Integer roleid);
    
    RoleCustomer selectRoleById(Integer roleid);
    
    int deleteRolePrivByRoleId(Integer roleid);
}